

let cow = {
    name:"cow",
    MarketValue: 300,
    cold: -10,
    nut: 14/1 * 0.05,     // nut per day
    hungry: 0.535,   
}

let dromedary = {
    name:"dromedary",
    MarketValue: 300,
    cold: -22, hot: 60,
    nut: 18/2 * 0.05,     // nut per day
    hungry: 0.535,   
}

let goat = {
    name:"goat",
    MarketValue: 200,
    cold: -20, 
    nut: 12/3 * 0.05,     // nut per day
    hungry: 0.225,
}

let elk = {
    MarketValue: 200,
    name:"elk",
    cold: -50, 
    nut: 11/3 * 0.05,     // nut per day
    hungry: 0.535,
}

let Ostrich = {
    MarketValue: 250,
    name:"Ostrich",
    nut: 1/3.33 * 0.6,     // nut per day
    hungry: 0.42
}

let chicken = {
    name:"chicken",
    MarketValue: 50,
    nut: 1/1 * 0.25,     // nut per day
    hungry: 0.14
}

let turkey = {
    MarketValue: 100,
    name:"turkey",
    nut: 1/1.333 * 0.5,     // nut per day
    hungry: 0.28
}

let goose = {
    name:"goose",
    MarketValue: 90,
    nut: 1/2 * 0.5,     // nut per day
    hungry: 0.28
}

let datas = [cow, dromedary, goat, elk, Ostrich, chicken, turkey, goose]

datas = datas.sort((a,b)=> {


    return a.nut/a.hungry - b.nut/b.hungry
}); 
// nut: cow dromedary turkey goose chicken
// nut/markvalue: chicken turkey goose cow dromedary
// nut/hungry: chicken turkey cow goose goat dromedary

console.log(datas);